#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
int main()
{
    int a[5] ={1,5,8,3,2};
    sort(begin(a),end(a));
    for(auto it= begin(a); it != end(a); it++)
            cout<<*it<<endl;
    auto p = find(begin(a),end(a),3);
    if(p != end(a))
        cout<<*p;

    string s("deavd");
    sort(s.begin(),s.end());
    cout<<endl;
    auto ps = find(s.begin(),s.end(),'d');
    if(ps != s.end())
          cout<<*ps<<endl;
    char c = '8';
    //s.replace(ps,ps+1,&c);
    s.erase(ps,ps+2);
    s.insert(ps,5,'2');
    for(auto e:s)  
        cout<<e;

    set<int> sset;
    sset.insert(10);
    sset.insert(20);
    sset.erase(sset.find(10));
    cout<<endl;
    for(auto e:sset)
        cout<<e<<endl;

}